<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      .box {
        height: 100vh;
        display: flex;
      }
      .left {
        background-color: pink;
        width: 200px;
        height: 100vh;
      }
      .right {
        background-color: yellow;
        /* 第一种方法：右边自适应 */
        /* flex: 1; */
        width: 200px;
        height: 100vh;
      }
      .center {
        background-color: aqua;
        /* 第二种方法：宽度减去左右固定宽度 */
        width: calc(100vw - 400px);
        height: 100vh;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <div class="left"></div>
      <div class="center"></div>
      <div class="right"></div>
    </div>
  </body>
</html>
